import { defineStore } from 'pinia'

interface StateType {
  count: number
}

export const useCounterStore = defineStore('counter', {
  state: (): StateType => ({
    count: 0
  }),
  actions: {
    increment() {
      this.count++
    }
  }
  // persist: true  pinia持久化配置
})
